﻿namespace HLStock.MyExcep
{
    public class MyAuthorizationException : MyException
    {
        public MyAuthorizationException() : base("身份验证异常") { }
        public MyAuthorizationException(string msg) : base(msg) { }
    }
    public class MyRestoreTokenException : MyAuthorizationException
    {
        public MyRestoreTokenException() : base("身份验证失败") { }
        public MyRestoreTokenException(string msg) : base(msg) { }

        public MyRestoreTokenException(Exception ex) : base("无法验证提供的TOKEN:\r\n" + ExceptionUtil.FormatExceptionInfo(ex)) { }
    }
    public class MyTokenTimeoutException : MyAuthorizationException
    {
        public MyTokenTimeoutException() : base("登录超时") { }
    }
    public class MyUserDisableException : MyAuthorizationException
    {
        public MyUserDisableException(string userCode) : base($"用户{userCode}已停用") { }
    }
}
